# -*- coding:utf-8 -*-
"""
Python 3.7
Author：刘爽、何若溥
Time：2022/08/26
"""

import json
import requests


def sendDing(token, data, header):
    try:
        res = requests.post(token, data=json.dumps(data), headers=header)
        print(res.text)
        print("钉钉消息发送成功")
    except Exception as e:
        print("钉钉消息发送失败，报错如下：\n", e)

